/**
 * KopsoxFramework
 * Copyright (C) 2010 Free Software Foundation, Inc. <http://fsf.org/>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.kopsox.util.data;

import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

/**
 * Enum for Formats<br>
 * The constants hold the acceptable formats, e.g.: dd.MM.yyyy
 * 
 * @author Konrad Renner - 04.10.2010
 *
 */
public enum FormatsEnum {

	DATE_FORMATS(new HashSet<String>()),
	TIME_FORMATS(new HashSet<String>());
	
	static {
        //Define the acceptable formats
        DATE_FORMATS.getFormats().add("dd.MM.yyyy");
        DATE_FORMATS.getFormats().add("dd/MM/yyyy");
        DATE_FORMATS.getFormats().add("yyyy-MM-dd");
        DATE_FORMATS.getFormats().add("yyyy-MM-dd hh:mm");
        DATE_FORMATS.getFormats().add("dd.MM.yyyy hh:mm");
        DATE_FORMATS.getFormats().add("dd/MM/yyyy hh:mm");
        DATE_FORMATS.getFormats().add("yyyy-MM-dd hh:mm:ss");
        DATE_FORMATS.getFormats().add("dd.MM.yyyy hh:mm:ss");
        DATE_FORMATS.getFormats().add("dd/MM/yyyy hh:mm:ss");
        
        DATE_FORMATS.getFormats().add("d.MM.yyyy");
        DATE_FORMATS.getFormats().add("d/MM/yyyy");
        DATE_FORMATS.getFormats().add("yyyy-MM-d");
        DATE_FORMATS.getFormats().add("yyyy-MM-d hh:mm");
        DATE_FORMATS.getFormats().add("d.MM.yyyy hh:mm");
        DATE_FORMATS.getFormats().add("d/MM/yyyy hh:mm");
        DATE_FORMATS.getFormats().add("yyyy-MM-d hh:mm:ss");
        DATE_FORMATS.getFormats().add("d.MM.yyyy hh:mm:ss");
        DATE_FORMATS.getFormats().add("d/MM/yyyy hh:mm:ss");
        
        DATE_FORMATS.getFormats().add("dd.M.yyyy");
        DATE_FORMATS.getFormats().add("dd/M/yyyy");
        DATE_FORMATS.getFormats().add("yyyy-M-dd");
        DATE_FORMATS.getFormats().add("yyyy-M-dd hh:mm");
        DATE_FORMATS.getFormats().add("dd.M.yyyy hh:mm");
        DATE_FORMATS.getFormats().add("dd/M/yyyy hh:mm");
        DATE_FORMATS.getFormats().add("yyyy-M-dd hh:mm:ss");
        DATE_FORMATS.getFormats().add("dd.M.yyyy hh:mm:ss");
        DATE_FORMATS.getFormats().add("dd/M/yyyy hh:mm:ss");
        
        DATE_FORMATS.getFormats().add("d.M.yyyy");
        DATE_FORMATS.getFormats().add("d/M/yyyy");
        DATE_FORMATS.getFormats().add("yyyy-M-d");
        DATE_FORMATS.getFormats().add("yyyy-M-d hh:mm");
        DATE_FORMATS.getFormats().add("d.M.yyyy hh:mm");
        DATE_FORMATS.getFormats().add("d/M/yyyy hh:mm");
        DATE_FORMATS.getFormats().add("yyyy-M-d hh:mm:ss");
        DATE_FORMATS.getFormats().add("d.M.yyyy hh:mm:ss");
        DATE_FORMATS.getFormats().add("d/M/yyyy hh:mm:ss");
        
        TIME_FORMATS.getFormats().add("hh:mm");
        TIME_FORMATS.getFormats().add("hh:mm:ss");
	}
	
	private Collection<String> formats;
	private FormatsEnum(Set<String> string) {
		this.formats = string;
	}
	
	public Collection<String> getFormats() {
		return this.formats;
	}
}
